package day03.edu;

import org.junit.Test;

import java.lang.annotation.Target;
import java.util.Date;

// Created: 09/03/2025, ChangJiang Ru
public class Annotation {
    public static void main(String[] args) {
        Person p = new Student();
        p.eat();
        System.out.println("======111");

        Date date = new Date();
        System.out.println(date);
        System.out.println("======222");

        Person person = new Person();
        person.show();
        person.run();
        System.out.println("=======333");

//        @SuppressWarnings("unused") intn um = 10;
    }
}

@MyAnnotation(value = "class")
class Person {
    String name;

    @MyAnnotation(value = "method")
    void eat() {
        System.out.println("Person eat breakfast");
    }

    @Deprecated
    public void show() {
        System.out.println("I am showing");
    }

    public void drink() {
        System.out.println("I will drink the milk");
    }

    @Test
    public void run() {
        System.out.println("I will run to anywhere");
    }
}

class Student extends Person {
    @Override
    void eat() {
        System.out.println("Student eat lunch");
    }
}